﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MODEL
{
    public partial class qgzx_teacher
    {
        #region 纯的实体对象 + ToPOCO()
        /// <summary>
        /// 纯的实体对象
        /// </summary>
        /// <returns></returns>
        public qgzx_teacher ToPOCO()
        {
            qgzx_teacher poco = new qgzx_teacher()
            {
                Id = this.Id,
                LoginName = this.LoginName,
                Password = this.Password,
                Department = this.Department,
                WorkPlace = this.WorkPlace,
                WorkPhone = this.WorkPhone,
                TeacherName = this.TeacherName,
                TeacherPhone = this.TeacherPhone
            };
            return poco;
        }
        #endregion


        #region 1.0 生成 TViewModel 实体对象 +ToViewModel
        /// <summary>
        /// 生成 很纯洁的 实体对象
        /// </summary>
        /// <returns></returns>
        public ViewModel.Teacher ToViewModel()
        {
            ViewModel.Teacher poco = new ViewModel.Teacher()
            {
                Id = this.Id,
                LoginName = this.LoginName,
                Password = this.Password,
                Department = this.Department,
                WorkPlace = this.WorkPlace,
                WorkPhone = this.WorkPhone,
                TeacherName = this.TeacherName,
                TeacherPhone = this.TeacherPhone
            };
            return poco;
        }
        #endregion
    }
}
